<template>
    <div class="wrapper">
        <div class="button" v-for="item in props.iconList" :key="item.path">
            <div class="icon">
                <img height="40" width="40" :src="item.icon" alt="">
            </div>
            <a :href="item.path">{{ item.title }}</a>
        </div>
    </div>
</template>

<script setup lang="ts">
const props = defineProps({
    iconList: {
        type: Array<any>,
        default: () => [],
    },
})
</script>
<style scoped lang='scss'>
.wrapper {
    display: flex;
    flex-wrap: wrap;

    .button {
        height: 60px;
        width: 60px;
        display: flex;
        cursor: pointer;
        margin: 10px 20px;
        overflow: hidden;
        background-color: #fff;
        border-radius: 50px;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        transition: all 0.3s;

        .icon {
            display: inline-block;
            height: 60px;
            width: 60px;
            text-align: center;
            line-height: 60px;
            margin-left: 10px;
            border-radius: 50%;
            box-sizing: border-box;
        }

        a {
            font-size: 1.2rem;
            font-weight: 500;
            line-height: 60px;
            margin-left: 10px;
        }
    }

    .button:hover {
        width: 200px;
    }

}
</style>